package s17.ch20.ex3;

import java.util.ArrayList;

public class NumberParser implements Parser {

	public NumberList parse(String data) {

		String[] numbers = data.split(",");
		NumberList numberList = new NumberList();
		numberList.setIntegers(new ArrayList<Integer>());
		for (String string : numbers) {
			numberList.getIntegers().add(new Integer(string));
		}
		return numberList;

	}

}
